package com.tao.common.utils;

import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author GSJ
 * @description 返回结果工具类
 */
@Data
@NoArgsConstructor
@Builder
public class ResultUtil {
    private Integer code;
    private String msg;
    private Object data;
    private Long total;

    public ResultUtil(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ResultUtil(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResultUtil(Integer code, String msg, Object data, Long total) {
        this.code = code;
        this.msg = msg;
        this.data = data;
        this.total = total;
    }
}
